package service.impl;

import dao.UserDao;
import dao.impl.UserDaoImpl;
import domain.User;
import service.UserService;

public class UserServiceImpl implements UserService {
    private UserDao dao=new UserDaoImpl();
    @Override
    public boolean register(User user) {
        return dao.register(user);
    }

    @Override
    public User login(String userName, String password) throws Exception {
        return dao.login(userName,password);
    }

    @Override
    public User queryByUsername(String userName) {
        return dao.queryByUsername(userName);
    }

    @Override
    public boolean updateUserInfo(User user) throws Exception {
        return dao.updateUserInfo(user);
    }

    @Override
    public boolean addUserExperience(String userId, int exper) throws Exception {
        return dao.addUserExperience(userId,exper);
    }
}
